package com.wwz.dao;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.wwz.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.Map;

@Mapper
public interface UserDao  extends BaseMapper<User> {

    @Insert("insert into tb_user(name,branch_id) values(#{name},#{branchId})")
    int insert(@Param("name")String name,@Param("branchId")long branchId);

    @Delete("delete from  tb_user where branch_id=#{branchId}")
    int delete(@Param("branchId")String branchId);

    @Select("select * from tb_user where name = #{username}")
    Map<String,String> login(@Param("username")String username, @Param("password")String password);
}
